package com.eascs.spider.ant.worker;

import javax.annotation.PostConstruct;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import com.eascs.spider.ant.worker.handler.Register;

/**
 * 工作节点启动入口
 * @author hzp
 * 
 */
@SpringBootApplication
public class WorkerLauncher {
	
	@Autowired
	Register register;
	
	
    public static void main( String[] args ){
        SpringApplication.run(WorkerLauncher.class, args);
    }
    
    @PostConstruct
    private void init(){
    	//将工作节点信息注册到zookeeper
    	register.send();
    }
}
